home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 62
/
Volume 62 - JOGO DISK .iso
/
Games
/
penguin_dinner.swf
/
scripts
/
__Packages
/
classes
/
ui
/
MapScreen.as
< prev
next >
Wrap
Text File
|
2008-03-17
|
1KB
|
39 lines
class classes.ui.MapScreen extends classes.ui.AbstractWidget
{
static var BUTTON_CLICKED = "button_clicked";
function MapScreen()
{
super();
classes.core.SoundManager.getInstance().startMusicTrack("storm_loop");
this.doLater(this.init);
}
function init()
{
this.hero.setAnimationState("init_pos_" + classes.core.SOManager.getInstance().__get__currentStage());
this.animator = new classes.core.Animator([this.hero]);
this.startLocalLoop(this.update);
this.next_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
}
function update()
{
this.animator.update();
}
function onButtonClick(e)
{
var _loc0_ = null;
if((_loc0_ = e.target) === this.next_btn)
{
classes.core.WidgetManager.getInstance().lockAllGlobal();
var _loc2_ = classes.core.SOManager.getInstance().__get__currentStage();
this.hero.animate(["anim_" + _loc2_,"end_pos_" + _loc2_]);
this.hero.addEventListener(classes.movieclip.AnimatedClip.COMPLETE_SEQUENCE,classes.core.Application.getInstance(),"gotoGameBoard");
}
}
function dispose()
{
this.next_btn.dispose();
this.animator.dispose();
super.dispose();
}
}